//
//  TweetCommentViewModel.m
//  OSChina
//
//  Created by 8b410-2 on 17/1/1.
//  Copyright © 2017年 abb. All rights reserved.
//

#import "OSCTweetCommentViewModel.h"
#import "OSCEmoticonPackage.h"
@implementation OSCTweetCommentViewModel

- (instancetype)initWithCommentModel:(OSCComment *)comment {
    if (self = [super init]) {
        _idField = comment.idField;
        // 正文处理 先处理html 再处理表情
        _content = [OSCEmoticonPackage emoticonStringFromAttributedString:[self handleHTMLSting:comment.content]];
        _pubDate = comment.pubDate;
        _commentAuthor = comment.commentAuthor;
        _commentAuthorId = comment.commentAuthorId;
        _commentPortrait = comment.commentPortrait;
    }
    return self;
}

@end
